package com.xly.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xly.dao.ReportDao;
import com.xly.entity.CheckReport;
import com.xly.service.ReportService;

/** 
* @author Your-Name: Carey
* @version Create-Date：2020年3月17日 下午7:18:14 
* Class Description:
*/
@Service
public class ReportServcieImpl implements ReportService {

	@Autowired
	private ReportDao reportDao;
	
	//条件查询
	public List<Map<String,Object>> selectCondition(String username, int diagnostictype, String inspectionitems,
			String symptom, String diagnosticresult) {
		List<Map<String,Object>> list = reportDao.selectCondition(username, diagnostictype,
				inspectionitems, symptom, diagnosticresult);
		return list;
		
	}
	
	//根据检查报告id获取详情
	public List<CheckReport> selectById(int id){
		List<CheckReport> list = reportDao.selectById(id);
		return list;
	}
	
	//更新 
	public int updateById(CheckReport report) {
		int i = reportDao.updateById(report);
		return i;
	}
	
	//添加
	public int insertReport(CheckReport report) {
		int i = reportDao.insertReport(report);
		return i;
	}

}
